<template>
  <tabbar style="position:fixed;" >
    <tabbar-item link="/" :selected="selected.indexOf('home') !== -1">
      <i slot="icon" class="iconfont icon-shouye1"></i>
      <span slot="label">首页</span>
    </tabbar-item>
    <tabbar-item link="/products?category_id=1" :selected="selected.indexOf('products') !== -1">
      <i slot="icon" class="iconfont icon-jingdian"></i>
      <span slot="label">商城</span>
    </tabbar-item>
    <tabbar-item link="/courses/category" icon-class="footer-bar-logo">
      <img slot="icon" src="./images/logo.png">
    </tabbar-item>
    <tabbar-item link="/posts?category=3" :selected="selected.indexOf('posts') !== -1">
      <i slot="icon" class="iconfont icon-wenzhang"></i>
      <span slot="label">动态</span>
    </tabbar-item>
    <tabbar-item link="/user" :selected="selected.indexOf('user') !== -1" :badge="$store.getters.unreadMessage + ''">
      <i slot="icon" class="iconfont icon-wode1"></i>
      <span slot="label">我的</span>
    </tabbar-item>
  </tabbar>
</template>
<script>
import { Tabbar, TabbarItem } from 'vux'
export default {
  name: 'footerBar',
  components: {
    Tabbar,
    TabbarItem
  },
  props: {
    selected: {
      type: String,
      default: 'home'
    }
  },
  computed: {
  }
}
</script>

<style>
</style>
